Add PreAllocatedOverlapped.UnsafeCreate / UnsafeAllocateNativeOverlapped - #53196
Conversation
|
Tagging subscribers to this area: @mangod9 Issue DetailsFixes #42549
|
|
Note regarding the This serves as a reminder for when your PR is modifying a ref *.cs file and adding/modifying public APIs, to please make sure the API implementation in the src *.cs file is documented with triple slash comments, so the PR reviewers can sign off that change. |
|
@stephentoub Feel free also to give feedback on the approved API shape. Anything weird? Missing? Some of the review was us trying to channel your spirit and proactively guess your feedback. :) |
My one piece of feedback is that I'm skeptical the UnsafeAllocateNativeOverlapped method is worthwhile. If you care about perf, you should be using PreAllocatedOverlapped... the UnsafeCreate there makes sense. But the minor savings that come from not capturing the ExecutionContext with the non-preallocated variant will pale in comparison to using the preallocated variant. Note that this PR doesn't make use of UnsafeAllocateNativeOverlapped, because our higher-performance code paths use PreAllocatedOverlapped. |
Fixes #42549